@extends('layouts.admin_common') @section('content')

    @if(app('env')=='production')
        <script src="{{ secure_asset('/js/sy_common.js') }}"></script>
    @else
        <script src="{{ asset('/js/sy_common.js') }}"></script>
    @endif

    @if($type == 2)
        <div class="breadcrumbs_container">{{Breadcrumbs::render('admin.invoice_detail') }}</div>
    @else
        <div class="breadcrumbs_container">{{Breadcrumbs::render('admin.invoice_detail2') }}</div>
    @endif
    <div class="system_tab_line"></div>

    <style>
        .lyx_flex {
            display: -webkit-flex; /* Safari */
            display: flex;
            justify-content: center;
        }

        .lyx_search_table {
            width: 50rem;
        }

        .text-right {
            text-align: right;
        }
    </style>
    <div class="lyx_flex">

        <div class="lyx_search_table">
            <div class="row">
                <div class="col-sm-12" style="text-align: center"><h2>納品書</h2></div>
            </div>

            <div class="row">

                <div class="col-6">{{fun_corp($orderInfo['corp_id'])}}</div>
                <div class="col-sm-6 text-right">納品書{{$orderInfo['order_id']}}</div>

                <div class="col-6">{{$orderInfo['add']}}</div>
                <div class="col-6 text-right">発行日:{{toDate(strtotime($orderInfo['create_time']),'Y-m-d')}}</div>

                <div class="col-12">{{$orderInfo['add_alias']}}</div>
                <div class="col-12 ">TEL:{{$orderInfo['tel']}}</div>

                <div class="col-sm-12" style="height: 20px"></div>

                <div class="col-6">
                    平素より大変お世話になっております。この度は弊社商品をご購入いただき誠にありがとうございます以下の通り納品させていただきましたので,ご査収の程、宜しくお願い申し上げます.
                </div>
                <div class="col-6 text-right row">
                    <div class="col-sm-12">{{$myCorp->corp_name}}</div>
                    <div class="col-sm-12">{{$myCorp->corp_adress}}</div>
                    <div class="col-sm-12">TEL:{{$myCorp->corp_tel}}</div>
                </div>
            </div>


            <div class="lyx_table">

                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th scope="col">@lang('symessages.ajax_data.deliver_time')</th>
                        <th scope="col">@lang('symessages.info.product_name')</th>
                        <th scope="col">@lang('symessages.info.out_num')</th>
                        <th scope="col">@lang('symessages.info.price')</th>
                        <th scope="col">@lang('symessages.info.total_money')</th>
                        <th scope="col">@lang('symessages.ajax_data.courier_number')</th>

                    </tr>
                    </thead>
                    <tbody>
                    <?php $total_money = 0;?>
                    @foreach($orderDetail as $value)
                        <tr>
                            <td>{{$value->deliver_time}}</td>
                            <td>{{$value->goods_name}}</td>
                            <td>{{$value->num}}</td>
                            <td>{{$value->goods_price}}</td>
                            <td>{{$value->goods_price * $value->num}}</td>
                            <td>{{$value->courier_number}}</td>
                        </tr>
                        <?php $total_money += ($value->goods_price * $value->num)?>
                        @if($loop->last)
                            <tr>
                                <td colspan="4">@lang('symessages.info.total_money')</td>
                                <td colspan="2">{{$total_money}}</td>
                            </tr>
                        @endif
                    @endforeach
                    </tbody>
                </table>
            </div>

        </div>
    </div>

@endsection

